package com.kdfly.zmdfsj.activity;

import android.content.Intent;
import android.os.Bundle;
import android.support.annotation.Nullable;
import android.support.v7.app.AppCompatActivity;
import android.view.View;
import android.widget.Button;

import com.kdfly.zmdfsj.GameEngine;
import com.kdfly.zmdfsj.MainActivity;
import com.kdfly.zmdfsj.R;

import butterknife.BindView;
import butterknife.ButterKnife;

/**
 * Created by 小王子 on 2016-07-12.
 */
public class WelcomeActivity extends AppCompatActivity {
    @BindView(R.id.button) Button button;

    @Override
    protected void onCreate(@Nullable Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_welcome);
        ButterKnife.bind(this);
        button.setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View view) {
                startActivity(new Intent(WelcomeActivity.this, MainActivity.class));
                GameEngine.getInstance().startNewGame();
            }
        });
    }
}
